﻿<%@ Page Language="C#" MasterPageFile="~/store/StoreMasterPage.master" AutoEventWireup="true" CodeBehind="search_store.aspx.cs" Inherits="Com.Web.coffinegurunaru.store.search_store"%>
<%@ Register TagPrefix="UC" TagName="Paging" Src="~/store/usercontrol/paging.ascx" %>
<%@ Import Namespace="Com.Library.DB.Store" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">


<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="33">&nbsp;</td>
          </tr>
          <tr>
            <td><img src="/images/store/tit_02.gif" width="394" height="48"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td align="center"><!--리스트 내용 --><!--리스트 내용 끝 --></td>
          </tr>
          <tr>
            <td><img src="/images/store/outstore_img.gif" width="769" height="85"></td>
          </tr>
          <tr>
            <td><table width="769" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="28" valign="top"><img src="/images/store/store_left.gif" width="28" height="361"></td>
                <td valign="top"><!--지점 상세내용 -->
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="center"><table width="93%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td height="30">&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td width="100" height="20"><img src="/images/store/txt_01.gif" width="57" height="13"></td>
                              <td><img src="/images/store/txt_02.gif" width="67" height="13"></td>
                              </tr>
                            <tr>
                              <td><select name='m_selCityName' id="m_selCityName" class="minput">
     <option value="" <%=CityName == "" ? "selected='selected'" : "" %>>선택</option>
     <option value="강원"  <%=CityName == "강원" ? "selected='selected'" : "" %>>강원</option>
     <option value="경기"  <%=CityName == "경기" ? "selected='selected'" : "" %>>경기</option>
     <option value="경남"  <%=CityName == "경남" ? "selected='selected'" : "" %>>경남</option>
     <option value="경북"  <%=CityName == "경북" ? "selected='selected'" : "" %>>경북</option>
     <option value="광주"  <%=CityName == "광주" ? "selected='selected'" : "" %>>광주</option>
     <option value="대구"  <%=CityName == "대구" ? "selected='selected'" : "" %>>대구</option>
     <option value="대전"  <%=CityName == "대전" ? "selected='selected'" : "" %>>대전</option>
     <option value="부산"  <%=CityName == "부산" ? "selected='selected'" : "" %>>부산</option>
     <option value="서울"  <%=CityName == "서울" ? "selected='selected'" : "" %>>서울</option>
     <option value="울산"  <%=CityName == "울산" ? "selected='selected'" : "" %>>울산</option>
     <option value="인천"  <%=CityName == "인천" ? "selected='selected'" : "" %>>인천</option>
     <option value="전남"  <%=CityName == "전남" ? "selected='selected'" : "" %>>전남</option>
     <option value="전북"  <%=CityName == "전북" ? "selected='selected'" : "" %>>전북</option>
     <option value="제주"  <%=CityName == "제주" ? "selected='selected'" : "" %>>제주</option>
     <option value="충남"  <%=CityName == "충남" ? "selected='selected'" : "" %>>충남</option>
     <option value="충북"  <%=CityName == "충북" ? "selected='selected'" : "" %>>충북</option>
                                  </select></td>
                              <td>
                                <input type='text' class='formmail_border' name='add4' id="m_StoreName" maxlength='20' size='20' value='<%=this.StoreName%>'>
                                <a href="#" id="m_btnSearch"><img src="/images/whatsnew/bt_search.gif" width="38" height="20" align="absmiddle"></a></td>
                              </tr>
                            </table></td>
                          </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td><table width="100%" border="0" cellspacing="0" cellpadding="0" background="/images/store/out_bg.gif">
                            <tr>
                              <td width="150" align="center"><img src="/images/store/txt_03.gif" width="21" height="12"></td>
                              <td width="3"><img src="/images/store/bar_line.gif" width="3" height="32"></td>
                              <td width="150" align="center"><img src="/images/store/txt_04.gif" width="30" height="12"></td>
                              <td width="3"><img src="/images/store/bar_line.gif" width="3" height="32"></td>
                              <td width="100" align="center"><img src="/images/store/txt_05.gif" width="21" height="12"></td>
                              <td width="3"><img src="/images/store/bar_line.gif" width="3" height="32"></td>
                              <td align="center"><img src="/images/store/txt_06.gif" width="21" height="12"></td>
                              </tr>
                            </table>
                            <table border='1' cellpadding='0' cellspacing='0' width='100%' style='border-collapse:collapse' bordercolor='#e6e6e6' frame='void'>
<% foreach (StoreEntity item in StoreList)
   { %>
                              <tr  onmouseover="this.style.backgroundColor='#eeeeee';"  onmouseout="this.style.backgroundColor='#ffffff';" style="cursor:pointer" onclick="location.href='/store/store_view.aspx?storeno=<%=item.StoreNo %>'">
                                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="150" align="center"><%=item.CityName %></td>
                                    <td width="3"><img src="/images/common/clear.gif" width="1" height="1"></td>
                                    <td width="150" align="center"><%=item.StoreName %></td>
                                    <td width="3"><img src="/images/common/clear.gif" width="1" height="1"></td>
                                    <td width="100" align="center" class="small_gray"><%=item.Phone %></td>
                                    <td width="3"><img src="/images/common/clear.gif" width="1" height="1"></td>
                                    <td style="padding-left:10px"><p><%=item.Address%></p></td>
                                    </tr>
                                  </table></td>
                                </tr>
<% } %>
                              <tr>
                                <td height='2' bgcolor='#f5f5f5'></td>
                                </tr>
                              </table></td>
                          </tr>
                        <tr>
                          <td height="25">&nbsp;</td>
                          </tr>
                        <tr>
                          <td height="35" align="center"><UC:Paging ID="UC_Paging" runat="server" /></td>
                          </tr>
                        </table></td>
                      </tr>
                    </table>
                  <!--지점 상세내용 끝 --></td>
                <td width="30" valign="top"><img src="/images/store/store_right.gif" width="30" height="361"></td>
                </tr>
              </table></td>
          </tr>
          </table>
<script language="javascript" type="text/javascript">
(function($){
	$(function() {
		$("#m_selCityName").change(function() {
			var query = "";
			query += $("#m_selCityName").val() != "" ? "&CityName=" + encodeURIComponent($("#m_selCityName").val()) : "";
			location.href = "/store/search_store.aspx?PageNo=1" + query;
		});
		
		$("#m_StoreName").keypress(function(e) {
			if ( e.keyCode == 13 ) {
				$("#m_btnSearch").click();
				return false;
			}
		});
		
		$("#m_btnSearch").click(function() {
			var query = "";
			query += $("#m_selCityName").val() != "" ? "&CityName=" + encodeURIComponent($("#m_selCityName").val()) : "";
			query += $("#m_StoreName").val() != "" ? "&StoreName=" + encodeURIComponent($.trim($("#m_StoreName").val())) : "";
			
			if ($.trim($("#m_StoreName").val()) == "" ) {
				alert("검색할 매장명을 입력하세요");
				return;
			}
			
			location.href = "/store/search_store.aspx?PageNo=1" + query;
		});
	});
})(jQuery);

</script>

</asp:Content>
